<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<div class="pageContent">
	
		<div class="pageFormContent2" layoutH="58">
			<p>
				<label>渠道编码：</label>
				<input type="text" name="channelName" size="30" minlength="6" maxlength="20" readonly value="${requestScope.channel.channel.PChannelNumber }" />
			</p>
			<p>
				<label>渠道名称：</label>
				<input type="text" name="channelName" size="30" minlength="6" maxlength="20" readonly value="${requestScope.channel.channel.PChannelName }" />
			</p>
			<p>
				<label>渠道别名：</label>
				<input type="text" name="channelAlias" size="30" readonly  value="${requestScope.channel.channel.PChannelAlias}"/>
			</p>
			<p>
				<label>渠道类别：</label>
				<input type="text" name="channeltype" size="30" readonly value="${requestScope.channel.typeName}" />
			</p>
			<p>
				<label>物流模式：</label>
				<input type="text" id="channelModel" name="channelModel" size="30" readonly value="${requestScope.channel.channel.PChannelMode}" />
			</p>
			<p>
				<label>材积计算(除数)：</label>
				<input type="text" name="channelModel" size="30" readonly value="${requestScope.channel.channel.PChannelVolume}" />
			</p>
			<p>
				<label>结算重量规则：</label>
				<input type="text" name="rule" size="30" readonly value="${requestScope.channel.channel.PChannelRule}" />
			</p>
			<p>
				<label>小货进位标准：</label>
				<input type="text" name="scarry" size="30" readonly value="${requestScope.channel.channel.PChannelScarry}" />
			</p>
			<p>
				<label>大货进位标准：</label>
				<input type="text" name="bcarry" size="30" readonly value="${requestScope.channel.channel.PChannelBcarry}" />
			</p>
			<p>
				<label>偏远最低金额：</label>
				<input type="text" name="remote" size="30" readonly value="${requestScope.channel.channel.PChannelRemote}" />
			</p>
			<p>
				<label>偏远计算公式：</label>
				<input type="text" name="rformula" size="30" readonly value="${requestScope.channel.channel.PChannelRformula}" />
			</p>
			<p>
				<label>偏远是否含燃油：</label>
				<input type="text" name="fuel" id="fuel" size="30" readonly  />
			</p>
			<p>
				<label>挂号费(公式)：</label>
				<input type="text" name="costs" size="30" readonly value="${requestScope.channel.channel.PChannelRegistrationFee}" />
			</p>
			<p>
				<label>操作费(公式)：</label>
				<input type="text" name="registrationFee" size="30" readonly value="${requestScope.channel.channel.PChannelOperatCosts}" />
			</p>
						<p>
				<label>
					其他费用(公式)：
				</label>
				<input type="text" size="20" readonly value="${requestScope.channel.channel.PChannelOtherFee}" />
			</p>
			<p>
				<label>适用类别：</label>
				<input type="text" id="channelClass1" name="channelClass" size="30" readonly />
			</p>
			<p>
				<label>起始分区数：</label>
				<input type="text" name="SPartition" size="30" readonly value="${requestScope.channel.channel.PChannelSPartition}" />
			</p>
			<p>
				<label>目的分区数：</label>
				<input type="text" name="EPartition" size="30" readonly value="${requestScope.channel.channel.PChannelEPartition}" />
			</p>
			<p>
				<label>渠道单号生成规则：</label>
				<input type="text" id="registeredClass" name="registeredClass" size="30" readonly />
			</p>
			<p>
				<label>递送时间：</label>
				<input type="text" name="time" size="30" readonly value="${requestScope.channel.channel.PChannelSpeedTime}" />
			</p>
			<p>
				<label>航空标签图片：</label>
				<img alt="航空标签图片" src="${requestScope.channel.channel.PChannelImgAir}" width="130" height="50">
			</p>
			<p>
				<label>特许码图片：</label>
				<img alt="特许码图片" src="${requestScope.channel.channel.PChannelImgCode}" width="130" height="50">
			</p>
			<p>
				<label>渠道标识图片：</label>
				<img id="imgCCC" alt="渠道标识图片" src="${requestScope.channel.channel.PChannelImgC}" width="130" height="50">
			</p>
			<p>
				<label>状态：</label>
				<input type="text" id="status" name="status" size="30" readonly />
			</p>
			<p>
				<label>排序：</label>
				<input type="text" name="time" size="30" readonly value="${requestScope.channel.channel.PChannelSort}" />
			</p>
			<p>
				<label>添加时间：</label>
				<fmt:formatDate value="${requestScope.channel.channel.PChannelAddDate}" type="date" dateStyle="long"/>
			</p>
			<p>
				<label>渠道说明：</label>
				<textarea cols="50" rows="5" readonly >${requestScope.channel.channel.PChannelNote}</textarea>
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">确定</button></div></div></li>
			</ul>
		</div>
	
</div>
<script type="text/javascript" >
	(function (){
		var mode = $("#channelModel");
		switch('${requestScope.channel.channel.PChannelMode}'){
			case "PT":
				mode.attr("value","国际小包");
				break;
			case "IE":
				mode.attr("value","国际快递");
				break;
			case "DC":
				mode.attr("value","国内快递");
				break;
			case "AT":
				mode.attr("value","空运");
				break;
			case "SG":
				mode.attr("value","海运");
				break;
			case "WG":
				mode.attr("value","仓储");
				break;
				
		}
		var a = document.getElementById("fuel");
		if(${requestScope.channel.channel.PChannelFuel}){
			a.value = "包含";
		}else{
			a.value = "不包含";
		}
		
		var b = document.getElementById("channelClass1");
		switch(${requestScope.channel.channel.PChannelClass}){
		 	case 1:
		 		b.value = "出货";
		 		break;
		 	case 2:
		 		b.value = "收货";
		 		break;
		 	case 3:
		 		b.value = "出/收货";
		 	case 4:
		 		b.value = "收货(用于生成报价)";
		 		break;
		 }
		
		var c= document.getElementById("registeredClass");
		switch("${requestScope.channel.channel.registeredClassname}"){
			case "CY":
				c.value = "以公司为主";
				break;
			case "CL":
				c.value = "以渠道为主";
				break;
			case "NO":
				c.value = "不需要";
				break;
		}
		
		var d= document.getElementById("status");
		switch("${requestScope.channel.channel.PChannelStatus}"){
			case "CL":
				d.value = "禁用";
				break;
			case "NE":
				d.value = "启用";
				break;
		}
		
	})();

</script>
